package co.com.javeriana.aes.patrones.endpoint;

import java.io.IOException;
import java.io.Serializable;
import java.util.Map;

import org.apache.commons.lang.SerializationUtils;

import co.com.javeriana.aes.patrones.saiii.cliente.topics.Topicos;

import com.rabbitmq.client.MessageProperties;

public class Envio extends EndPoint{
	
	public Envio(String endPointName) throws IOException{
		super(endPointName);
	}

	public void sendMessage(Map<Topicos, Object> cliente) throws IOException {
	    channel.basicPublish("",endPointName, MessageProperties.PERSISTENT_BASIC, SerializationUtils.serialize((Serializable) cliente));
	}	
}